SG Window | |
EndDialog Method |
See Also Overview Properties Methods Events Constants Error Codes How To... FAQ |
Closes and destroys modal dialog box.
object.EndDialog result As Long
Part | Description |
object | The object is expression that evaluates to Window object |
result | Value to be returned to from the DoModal method. |
You must use EndDialog method to destroy modal dialog box created by the DoModal method. EndDialog can be called only from within dialog box message handler. This method is usually called as a response to WM_CLOSE message or Ok/Cancel button click.
EndDialog does not destroy the dialog box immediately. Dialog box is destroyed when message handler returns control to the system.
DoModal topic contains example that shows how to use EndDialog method.